package ink.yql.model;

import java.io.Serializable;

/**
 * @author YQL
 */
public class Dynamic implements Serializable {
    /**
     * 动态id
     */
    private Integer did;
    /**
     * 用户id
     */
    private Integer uid;
    /**
     * 动态内容
     */
    private String dcontext;
    /**
     * 动态发布时间
     */
    private String  daddtime;
    /**
     * 动态的状态
     */
    private Integer dstatus;
    /**
     * 点赞数
     */
    private Integer dlike;
    /**
     * 评论数
     */
    private Integer dcomments;

    public Dynamic(Integer did, Integer uid, String dcontext, String daddtime, Integer dstatus, Integer dlike, Integer dcomments) {
        this.did = did;
        this.uid = uid;
        this.dcontext = dcontext;
        this.daddtime = daddtime;
        this.dstatus = dstatus;
        this.dlike = dlike;
        this.dcomments = dcomments;
    }

    public Dynamic() {
    }

    public static DynamicBuilder builder() {
        return new DynamicBuilder();
    }

    public Integer getDid() {
        return this.did;
    }

    public Integer getUid() {
        return this.uid;
    }

    public String getDcontext() {
        return this.dcontext;
    }

    public String getDaddtime() {
        return this.daddtime;
    }

    public Integer getDstatus() {
        return this.dstatus;
    }

    public Integer getDlike() {
        return this.dlike;
    }

    public Integer getDcomments() {
        return this.dcomments;
    }

    public void setDid(Integer did) {
        this.did = did;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public void setDcontext(String dcontext) {
        this.dcontext = dcontext;
    }

    public void setDaddtime(String daddtime) {
        this.daddtime = daddtime;
    }

    public void setDstatus(Integer dstatus) {
        this.dstatus = dstatus;
    }

    public void setDlike(Integer dlike) {
        this.dlike = dlike;
    }

    public void setDcomments(Integer dcomments) {
        this.dcomments = dcomments;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof Dynamic)) return false;
        final Dynamic other = (Dynamic) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$did = this.getDid();
        final Object other$did = other.getDid();
        if (this$did == null ? other$did != null : !this$did.equals(other$did)) return false;
        final Object this$uid = this.getUid();
        final Object other$uid = other.getUid();
        if (this$uid == null ? other$uid != null : !this$uid.equals(other$uid)) return false;
        final Object this$dcontext = this.getDcontext();
        final Object other$dcontext = other.getDcontext();
        if (this$dcontext == null ? other$dcontext != null : !this$dcontext.equals(other$dcontext)) return false;
        final Object this$daddtime = this.getDaddtime();
        final Object other$daddtime = other.getDaddtime();
        if (this$daddtime == null ? other$daddtime != null : !this$daddtime.equals(other$daddtime)) return false;
        final Object this$dstatus = this.getDstatus();
        final Object other$dstatus = other.getDstatus();
        if (this$dstatus == null ? other$dstatus != null : !this$dstatus.equals(other$dstatus)) return false;
        final Object this$dlike = this.getDlike();
        final Object other$dlike = other.getDlike();
        if (this$dlike == null ? other$dlike != null : !this$dlike.equals(other$dlike)) return false;
        final Object this$dcomments = this.getDcomments();
        final Object other$dcomments = other.getDcomments();
        if (this$dcomments == null ? other$dcomments != null : !this$dcomments.equals(other$dcomments)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof Dynamic;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $did = this.getDid();
        result = result * PRIME + ($did == null ? 43 : $did.hashCode());
        final Object $uid = this.getUid();
        result = result * PRIME + ($uid == null ? 43 : $uid.hashCode());
        final Object $dcontext = this.getDcontext();
        result = result * PRIME + ($dcontext == null ? 43 : $dcontext.hashCode());
        final Object $daddtime = this.getDaddtime();
        result = result * PRIME + ($daddtime == null ? 43 : $daddtime.hashCode());
        final Object $dstatus = this.getDstatus();
        result = result * PRIME + ($dstatus == null ? 43 : $dstatus.hashCode());
        final Object $dlike = this.getDlike();
        result = result * PRIME + ($dlike == null ? 43 : $dlike.hashCode());
        final Object $dcomments = this.getDcomments();
        result = result * PRIME + ($dcomments == null ? 43 : $dcomments.hashCode());
        return result;
    }

    public String toString() {
        return "Dynamic(did=" + this.getDid() + ", uid=" + this.getUid() + ", dcontext=" + this.getDcontext() + ", daddtime=" + this.getDaddtime() + ", dstatus=" + this.getDstatus() + ", dlike=" + this.getDlike() + ", dcomments=" + this.getDcomments() + ")";
    }

    public static class DynamicBuilder {
        private Integer did;
        private Integer uid;
        private String dcontext;
        private String daddtime;
        private Integer dstatus;
        private Integer dlike;
        private Integer dcomments;

        DynamicBuilder() {
        }

        public Dynamic.DynamicBuilder did(Integer did) {
            this.did = did;
            return this;
        }

        public Dynamic.DynamicBuilder uid(Integer uid) {
            this.uid = uid;
            return this;
        }

        public Dynamic.DynamicBuilder dcontext(String dcontext) {
            this.dcontext = dcontext;
            return this;
        }

        public Dynamic.DynamicBuilder daddtime(String daddtime) {
            this.daddtime = daddtime;
            return this;
        }

        public Dynamic.DynamicBuilder dstatus(Integer dstatus) {
            this.dstatus = dstatus;
            return this;
        }

        public Dynamic.DynamicBuilder dlike(Integer dlike) {
            this.dlike = dlike;
            return this;
        }

        public Dynamic.DynamicBuilder dcomments(Integer dcomments) {
            this.dcomments = dcomments;
            return this;
        }

        public Dynamic build() {
            return new Dynamic(did, uid, dcontext, daddtime, dstatus, dlike, dcomments);
        }

        public String toString() {
            return "Dynamic.DynamicBuilder(did=" + this.did + ", uid=" + this.uid + ", dcontext=" + this.dcontext + ", daddtime=" + this.daddtime + ", dstatus=" + this.dstatus + ", dlike=" + this.dlike + ", dcomments=" + this.dcomments + ")";
        }
    }
}
